/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.services.deposit;

/**
 *
 * @author jay
 */

import java.util.List;
import java.util.Map;
import javax.faces.model.SelectItem;
import src.domain.deposit.Deproduct;
import src.services.CRUEDService;

public class DeproductModel implements java.io.Serializable {
    
    private  CRUEDService service;
    
    public DeproductModel() {
        service = new CRUEDService();
    }
    
    public List<Deproduct> findAll(Map<String, String> filters) {
        return (List<Deproduct>) service.findAll("Deproduct", filters);
    }
    
    public List<SelectItem> listAll() {
        return service.listAll("Deproduct", "deproductId","productName");
    }
    
    public Deproduct getById(Integer id) {
        return (Deproduct) service.getById(Deproduct.class, id);
    }

    public boolean saveData(Deproduct data) {
        return service.saveData(data);
    }
    
    public boolean deleteData(Deproduct data) {
        return service.deleteData(data);
    }
}
